package com.two.lbms.vo;

import java.time.LocalDateTime;

import com.fasterxml.jackson.annotation.JsonFormat;

import jakarta.validation.constraints.Size;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 
 * @author hjx
 * @Date 2023/7/28 20:21
 * @version V1.0
 */
    
@Data
@AllArgsConstructor
@NoArgsConstructor
public class BookInfo {
    /**
    * 图书id
    */
    private Integer id;

    /**
    * 书名
    */
    @Size(max = 50,message = "书名最大长度要小于 50")
    private String bookName;

    /**
    * 作者
    */
    @Size(max = 30,message = "作者最大长度要小于 30")
    private String bookAuthor;

    /**
    * 类型
    */
    private Integer bookType;

    /**
    * 价格
    */
    private Double bookPrice;

    /**
    * 语言
    */
    @Size(max = 30,message = "语言最大长度要小于 30")
    private String language;

    /**
    * 出版日期
    */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private LocalDateTime publishDate;

    /**
    * 出版社
    */
    @Size(max = 50,message = "出版社最大长度要小于 50")
    private String publisher;

    /**
    * 是否有效
    */
    private Integer isValid;

    /**
    * 简介
    */
    @Size(max = 255,message = "简介最大长度要小于 255")
    private String introduction;
}